package service

import (
	"github.com/jmoiron/sqlx"
)

type ApiService struct {
	db *sqlx.DB
}

// SetService sets the service for the database.
func SetApiService(db *sqlx.DB) *ApiService {
	return &ApiService{db: db}
}

// GetDB returns the database.
func (s *ApiService) GetDB() *sqlx.DB {
	return s.db
}

// SetDB sets the database.
func (s *ApiService) SetDB(db *sqlx.DB) {
	s.db = db
}
